# -*- coding: utf-8 -*-
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import sys

class ListItem(QWidget):
    def __init__(self):
        QWidget.__init__(self)
        self.layout = QHBoxLayout()
        self.layout.addWidget(QLabel('HUJ PIZDA DJIGURDA!!!'))
        self.layout.addWidget(QPushButton('shared'))
        

class List(QScrollArea):
    def __init__(self):
        QScrollArea.__init__(self)
        self.setWidgetResizable(True)
        self.layout = QVBoxLayout()
        for i in xrange(3):
            self.layout.addWidget(ListItem())

    

class Window(QWidget):
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        self.layout = QFormLayout(self)
        self.layout.setAlignment(Qt.AlignTop)
        for i in xrange(1000):
            self.layout.addRow(QLabel('HUJ PIZDA DJIGURDA!!!'),QPushButton('Button'+str(i+1)))
            #self.layout.addWidget(QPushButton('Button'+str(i+1)))

if __name__ == '__main__':
    app = QApplication(sys.argv)
    
    window = List()
    
    window.show()
    sys.exit(app.exec_())
